<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>调整顺序</title>
    <style>
      .box {
        width: 500px;
        height: 500px;
        border: 2px solid black;
        margin: 100px auto;
        display: flex; /*显示为弹性盒子*/
        flex-wrap: wrap;
      }

      .box div {
        width: 100px;
        height: 100px;
        border: 1px dashed red;
        box-sizing: border-box;
      }

      .div3 {
        order: 1;
      }

      .div5 {
        order: -1;
      }
    </style>
</head>
<body>
<div class="box">
  <div class="div1">1111</div>
  <div class="div2">2222</div>
  <div class="div3">3333</div>
  <div class="div4">4444</div>
  <div class="div5">5555</div>
</div>
</body>
</html>